var Console = (function() {

	return {

		text: function(selector, text) {
			jQuery(selector).append("<div><span class='timestamp'>" + DateUtils.format(new Date(), "yyyy-MM-dd HH:mm:ss.SSS") + "</span><span class='message'>" + text + "</span></div>");
		},

		event: function(selector, event, inst) {
			Console.text(selector, "Event [type=" + event.type + ",instance=" + inst.id() + "]");
		},

		method: function(selector, method, value, inst) {
			Console.text(selector, "Method [name=" + method + ",type=" + typeof(value) + ",value=" + value + ",instance=" + inst.id() + "]");
		}

	};

})();

jQuery(function() {

	jQuery(".spec-widget > label").click(function(evt) {
		var target = jQuery(this).parent().children("div");
		target.toggle();
		jQuery(this).css("color", target.is(":visible") ? "#FF0000" : "#CCCCCC");
	});

	jQuery(".spec-widget > div").hide();
	jQuery(".spec-widget > label").css("color", "#CCCCCC");
	
});
